﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;

namespace WcfRestLibrary
{
    [ServiceContract]
    public interface IProductService
    {
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json)]
        //[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json)]
        ProductDTO[] GetProducts();

        [OperationContract]
        [WebGet(UriTemplate = "GetProducts/{categoryId}", ResponseFormat = WebMessageFormat.Json)]
        ProductDTO[] GetProductsById(string categoryId);
    }
}
